#include <iostream>
using namespace std;

class Vehicle
{
public:
    Vehicle()
    {
        speed = 0;
        weight = 0;
    }

    Vehicle(int s, int w)
    {
        speed = s;
        weight = w;
    }
    void setVehicle(int s, int w)
    {
        speed = s;
        weight = w;
    }
    void showVehicle()
    {
        cout << "speed: " << speed << endl;
        cout << "weight: " << weight << endl;
    }

private:
    int speed;
    int weight;
};

class Bicycle : public Vehicle
{
public:
    Bicycle()
    {
        high = 0;
    }

    Bicycle(int h, int s, int w)
    {
        high = h;
        setVehicle(s, w);
    }
    void setBicycle(int h)
    {
        high = h;
    }
    void showBicycle()
    {
        cout << "high: " << high << endl;
    }

private:
    int high;
};

class Car : public Vehicle
{
public:
    Car()
    {
        seatnum = 0;
    }

    Car(int s, int w, int n)
    {
        seatnum = n;
        setVehicle(s, w);
    }
    void setCar(int n)
    {
        seatnum = n;
    }
    void showCar()
    {
        cout << "seatnum: " << seatnum << endl;
    }

private:
    int seatnum;
};

class Motocycle : public Bicycle, public Car
{
public:
    Motocycle()
    {
        wheelnum = 0;
    }
    Motocycle(int w, int s, int wn, int n)
    {
        wheelnum = wn;
        Car::setVehicle(s, w);
        setBicycle(w);
        setCar(n);
    }
    void setMotocycle(int wn)
    {
        wheelnum = wn;
    }
    void showMotocycle()
    {
        cout << "wheelnum: " << wheelnum << endl;
    }
private:
    int wheelnum;
};
int main()
{
    Motocycle m1;
    m1.setMotocycle(2); 
    m1.setBicycle(1);
    m1.setCar(4);
    m1.Car::setVehicle(100, 200);
    m1.showMotocycle();
    m1.showBicycle();
    m1.showCar();
    m1.Car::showVehicle();


    return 0;
}